<?php
  session_start();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="html/text; charset=utf-8" />
<title>简易BBS系统</title>
</head>
<body>
<?php
include "head.php";
include "mysql.php";
include "myfunction.php";
$aa=new mysql;
$aa->link("");
$bb=new myfunction;
include "total_info.php";
?>
<table width="98%" border="0" align="center" cellspacing="1"  cellpadding="0">
<tr>
 <td height="25" width="50%" align="center">讨论区</td>
 <td height="25" width="10%" align="center">主题</td>
 <td height="25" width="10%" align="center">帖子</td>
 <td height="25" width="20%" align="center">最新帖子</td>
 <td height="25" width="10%" align="center">版主</td>
</tr>
<tr>
 <td height="1"></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellspacing="0"  cellpadding="0">
<?php
  $query="select * from father_module_info order by id";
  $rst=$aa->excu($query);
  while($farther_info=mysql_fetch_array($rst)){
?>
<tr>
 <td height="25" colspan="5">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo
     "<b>".$farther_info["module_name"]."</b>"; ?></td>
</tr>
 <?php
  $query="select * from son_module_info where farther_id='$farther_info[id]'";
  $rst=$aa->excu($query);
  while($son_info=mysql_fetch_array($rst)){
 ?>
 <tr>
  <td height="40" width="50%"><?php echo
"&nbsp;&nbsp;&nbsp;&nbsp;<a href=son_module_list.php?module_id=".$son_info["id"].">".$son_info["module_name"]."</a>";
echo "<br>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;".$son_info["module_cont"];
     ?>
  </td>
  <td width="10%" align="center"><?php echo $bb->son_module_idtonum($son_info["id"]) ?></td>
  <td width="10%" align="center"><?php echo $bb->son_module_idtonum2($son_info["id"]) ?></td>
  <td width="20%" align="center"><?php echo $bb->son_module_idtolast_note($son_info["id"]) ?></td>
  <td width="10%" align="center"><?php echo $bb->son_module_idtouser_name($son_info["id"]) ?></td>
 </tr>
 <?php }
  ?>
  <?php }
  ?>
  </table>
  <?php
  include "foot.php";
  ?>
  </body>
 </html>

















